package com.huawei.appgallery.foundation.ui.css;

import android.view.View;

public final class CSSSelectorMarker {
    private static final String PREFIX = "css/";

    public static void set(View view, String str) {
        if (view != null) {
            view.setTag(str);
        }
    }

    public static String get(View view) {
        if (view == null || view.getTag() == null) {
            return null;
        }
        String obj = view.getTag().toString();
        int length = PREFIX.length();
        if (!obj.startsWith(PREFIX) || obj.length() <= length) {
            return null;
        }
        return obj.substring(length);
    }
}
